Ext.define('BM.view.trade.AddCostItem', {
    extend: 'Ext.window.Window',
    alias : 'widget.addcostitem',
    title : '增加消费',
    layout: 'fit',
    height: 400,
    width : 600,
    autoShow: true,
    initComponent: function() {
        this.items = [{
        	xtype:'panel',
        	layout: 'border',
        	items:[
        	{
        	 region: 'west',
        	 margins: '5 5 2 5',
        	 title:'可消费的项目',
        	 width:240,
        	 items:[
	        	 {
		        	 height:100,
		        	 items:[
		        	 	{
			        	 	xtype:'panel',
			        	 	border:false,
			        	 	height:10
			        	},{
			               xtype: 'textfield',
			               fieldLabel: '输入项目名称',
			     		   labelAlign: 'right',
			     		   width:200,
			     		   labelWidth: 80
			            },{
			               xtype: 'textfield',
			               fieldLabel: '消费数量',
			     		   labelAlign: 'right',
			     		   width:200,
			     		   labelWidth: 80
			             }
		        	 ]
		        },{
	             	layout:'fit',
	             	height:200,
	             	width:240,
	             	xtype:'tabpanel',
	             	items:[
	             	{
	             		title : '消费项目',
	             		items:{xtype : 'selectgoodsitem'}
	             		/*:'fit',
	             		items:{
	             			xtype:'goodsitemlist'
	             		}*/
	             	},{
	             		title:'消费项目',
	             		//layout:'fit',
	             		xtype : 'treepanel',
	             		height:200,
	             		width:240,
	             		store : 'TreeGoods'
	             		/*items:{
	             			xtype:'goodstree'
             			}*/
	             	}
	             	]
	            }
        	]
        	},{
        	 region: 'center',
        	 margins: '5 5 2 5',
        	 title:'顾客消费清单',
        	 width:340,
        	 items:[
        	 {
	        	 height:100,
        	     xtype:'form',
        	     fieldDefaults: {
            	   labelWidth: 55,
            	   labelAlign: 'right'
        		 },
	        	 items:[ ]
        	 },{
	        	layout:'fit',
             	height:200,
             	width:340
             	//xtype:'costdetaillist'
        	 }
        	 ]
        	}
        	]
        
        }
        ];

        this.buttons = [
            {
                text: 'Save',
                action: 'save'
            },
            {
                text: 'Cancel',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    }
});